<?php
if (!defined("IN_OP"))
{
    exit("You can't access this file directly...");
}
$gametype = intval(getvar("gametype"));
$gType = chkGametype($gametype);
switch ($gType)
{
    case 0 :
        $ui = new UI();
        include( "admin_menu.php" );
        break;
    default :
        include_once( "class_3d/CheckMode_3d.php" );
        $chk = new CheckMode_3d($curruser['acl'], 1, $gametype);
        $chk->checkShow3dPage();
        unset($chk);
        $ui = new UI_3D();
        $jslink = "<script language=\"JScript.Encode\" src=\"site.js\"></script>" . ( "<script language=\"VBScript.Encode\" src=\"site.vbs\"></script>" );
        $ui->set("jslink", $jslink);
        $ui->header();
        include( "admin_menu_3d.php" );
        break;
}
if (ispost())
{
    $post_user = array("", "", "", "", "", "", "", "", "", "");
    $j = 0;
    if (isset($_COOKIE['g_language']) && $_COOKIE['g_language'] == "zh-cn")
    {
        include_once( "class/ccharset.php" );
        $cc = new CCharset();
        $chgLang = true;
    }
    else
    {
        $chgLang = false;
    }
    $i = 0;
    while ($i < 10)
    {
        $name = safeHTML(getvar("user_" . $i));
        if ($name != "")
        {
            $post_user[$j] = $chgLang ? $cc->Gb_Big5($name) : $name;
            ++$j;
        }
        ++$i;
    }
    $i = 0;
    while ($i < 10)
    {
        $conf->set("port_systemuser_" . $i, $post_user[$i]);
        ++$i;
    }
}
$auto_user = array();
$i = 0;
while ($i < 10)
{
    $auto_user[$i] = $conf->get("port_systemuser_" . $i);
    ++$i;
}
echo "<div class='td2'>※ 公司走飞的网站名称设定(设定与其他玩法共用)<br />";
echo "※ 使用繁体版登入时，请输入繁体字；用使简体版登入时，请输入简体字。</div>";
echo "<form action=op.php?op=admin&fp=editupuser method=post>";
echo "<input type=hidden name=gametype value={$gametype} />";
echo "<table class=table0 border=0 cellpadding=3 cellspacing=1>";
echo "<tr class=bgClc_{$gametype} align=center><td>网站名称";
$i = 0;
while ($i < 10)
{
    echo "<tr class=td2 valign=top align=center>";
    echo "<td><input name=user_" . $i . " size=12 value=\"" . $auto_user[$i] . "\">";
    ++$i;
}
echo "</table><br><input type=submit value=确定修改>";
echo "</form><br><br>";
echo "</tbody></html>";
?>